package com.stlm2.dems.entity;

/**
 * Created by ZLQ on 2017/7/19.
 */
public enum GoodsCategoryLevel {

    Level1(1) {
        public String toString() {
            return "一级分类";
        }
    },
    Level2(2) {
        public String toString() {
            return "二级分类";
        }
    },
    Level3(3) {
        public String toString() {
            return "三级分类";
        }
    };
    private final int val;

    GoodsCategoryLevel(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static GoodsCategoryLevel getByIntValue(int n) {
        switch (n) {
            case 1:
                return Level1;
            case 2:
                return Level2;
            case 3:
                return Level3;
            default:
                return null;
        }
    }
}
